package util;

public class Util {

    public static void reverse(Object[] objects) {
        for (int i = 0; i < objects.length / 2; i++) {
            swap(objects, i, objects.length - 1 - i);
        }
    }

    public static void swap(Object[] objects, int index1, int index2) {
        Object o = objects[index1];
        objects[index1] = objects[index2];
        objects[index2] = o;
    }

}
